﻿@{
    //String _BodyContainerBorderCSS = String.Empty;
    int _BodyContainerGridSize = 10;
    //if(IsSectionDefined(AppConstants.Sections.LEFT_SIDEBAR)){
    //    _BodyContainerGridSize = _BodyContainerGridSize - 3;
    //    _BodyContainerBorderCSS += " border-left";
    //}
    if (IsSectionDefined(AppConstants.Sections.RIGHT_SIDEBAR))
    {
        _BodyContainerGridSize = _BodyContainerGridSize - 2;
        //_BodyContainerBorderCSS += " border-right";
    }
}
<!DOCTYPE html>
<html lang="en">
<head>
    <title>@ViewBag.Title</title>    
    @if (ConfigReader.IsProductionDeployment) {
        <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">
        <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css" rel="stylesheet">
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    } else {
        @Styles.Render(Bundles.BootstrapCSS)
        @Scripts.Render(Bundles.jQuery)
    }
    @Styles.Render(Bundles.RHStyles)
    @RenderSection(AppConstants.Sections.PAGE_HEAD, required : false)
</head>
<body>
    @Html.Partial("_Header2")

    <div class="container rh-body">
        <div class="row">
            @*Left Side Panel Start*@
            @*<div class="span3 nav-collapse collapse">*@
            <div class="col-md-2 rh-gridfix">
                <div class="rh-left-nav-margin-fix">
                    @Html.Partial("_UserMenu")
                </div>
            </div>
            @*Left Side Panel End
            Main Body Panel Start*@
            <div class="col-md-@(_BodyContainerGridSize) rh-body-grid">
                @RenderBody()
            </div>
            @*Main Body Panel End
            Right Side Panel Start*@
            @if (IsSectionDefined(AppConstants.Sections.RIGHT_SIDEBAR))
            {
                <div class="col-md-2">
                    @RenderSection(AppConstants.Sections.RIGHT_SIDEBAR, required: false)
                </div>
            }
            @*Right Side Panel End*@
        </div>
    </div>
    @Html.Partial("_Footer")    

    <div id="divLoadingAnimation"><img src="@Url.Content("~/")Content/images/loading.gif" alt="Loading" title="Loading" /></div>
    <div id="divBlockingContainer"></div>
    @*@Scripts.Render(Bundles.BootstrapJS, Bundles.CommonJS)*@
    @if (ConfigReader.IsProductionDeployment) {
        <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
    }
    else {
        @Scripts.Render(Bundles.BootstrapJS)
    }
    @Scripts.Render(Bundles.CommonJS)
    @RenderSection(AppConstants.Sections.JAVASCRIPT_PLACEHOLDER, required: false)
 </body>  
 </html>
